package com.headingdata.random;

import java.util.Random;

public class Random1 {
    public static void main(String[] args) {
        Random rm = new Random();

        //0-9随机数
        for (int i = 0;i < 10; i++) {
            int num = rm.nextInt(10);
            System.out.println(num);
        }
        System.out.println("-------------------------------------------------------------");
        //1-10随机数
        for (int i = 0;i < 10; i++) {
            int num1 = rm.nextInt(10)+1;
            System.out.println(num1);
        }
        System.out.println("-------------------------------------------------------------");

        //65-91随机数
        for (int i = 0;i < 10; i++) {
            int num3 = rm.nextInt(27)+65;
            System.out.println(num3);
        }

    }
}
